<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .one {
            width: 200px;
            height: 200px;
            background: orange;
        }

        .two {
            width: 100px;
            height: 100px;
            background: skyblue;
        }
    </style>
</head>
<body>
    <h3>事件修饰符</h3>
    <div id="app">
        <!-- 事件执行一次 -->
       <!-- <button @click.once="fn">按钮</button> -->
       <!-- v-once -->

       <!-- <h3 v-once>
           {{ title }}
       </h3>

       <input v-model="title" type="text"> -->

       <!-- self 只有触发事件源本身时才触发-->
       <div @click.self="fn" class="one">
            <div @click="fn1" class="two">
            </div>
       </div>
    </div>
    
    <script src="./js/vue.js"></script>

    <script>
        new Vue({
            el: "#app",
            data: {
                title: "我是标题"
            },
            methods: {
                fn() {
                    console.log(11)
                },
                fn1() {
                    console.log(22)
                }
            }
        })
    </script>
</body>
</html>